Synthesis by Completion

نویسنده

  • Nachum Dershowitz
چکیده

The Knuth-Bendix completion procedure was introduced as a means of deriving canonical term-rewriting systems to serve as deci­ sion procedures for given equational theories. The procedure gen­ erates new rewrite rules to resolve ambiguities resulting from exist­ ing rules that overlap. We propose using this procedure to syn­ thesize logic programs, as well as functional programs, from specifications and domain knowledge expressed as equivalencepreserving rewrite rules. An implementation is underway. 1 . I N T R O D U C T I O N A (first-order) functional (applicative) program is a set of directed equations, used to compute by replacing instances of left-hand sides wi th the value of the r ighthand sides. For example, the following is a program for concatenating two lists of elements: where <= has the declarative meaning "is equal" (nil is the empty list and • denotes the cons function). Given the term it wi l l compute the result of appending the two ele­ ments a and 6 in the list a.b.nil [with parentheses, that should be a(bnil)] to the front of the list c.d.e.nil. A logic program [Kowalski-74] is a set of Horn clauses used as a pattern-directed program that searches for output terms that satisfy a given goal for given input terms. In this paradigm, the append program would be expressed in two statements: *This research was supported in part by the National Science Foundation under Grant MCS 83-07755 and in part by the Israeli Ministry of Defense while the author was at the Department of Mathematics and Computer Science, Bar-Han University, RamatGan, Israel. where : — has the declarative meaning "is implied by" . Given a goal append (a b nil ,c d e nil ,Z), this program computes the appended list Z=a.b.c.d.e.nil. Throughout this paper we follow the convention of using lower case for constants and upper case for free (universally quantified) variables. A rewrite system is a set of directed equations (or equivalences) used as a nondeterministic patterndirected program that returns as output a simplified term equal to a given input term. (See [Huet-Oppen-80] for a survey.) For example, the following is a three-rule rewrite system for append: Rules may be applied in any order to any matching subterm unt i l no further applications are possible. Thus, applying the rules to the term append {a nil,nil), one gets either the rewrite sequence append (a nil ,nil) a append (nil ,nil) a nil, or (using only the second rule) simply append (a nil ,nil) a nil. Such pattern-directed functional programming is avail­ able in SASL [Turner-79], HOPE [Burstall-MacQueenSannella-80], OBJ2 [Futatsugi,et al.-84], rewrite languages [Hoffmann-O'Donnell-82], and PLANNER-like languages. In this paper, we describe how the Knuth-Bendix completion procedure [Knuth-Bendix-70] may be used to generate programs f rom their (equational) specifications. The completion procedure was originally suggested as a means of generating rewrite systems that can be used to decide the val id i ty of identities in equational theories. Given a finite set of equations and a monotonic, wellfounded ordering on terms, the procedure generates

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Region Completion in a Texture using Multiresolution Transforms

Abstract Natural images, textures and photographs are likely to be impaired by stains.  As a result a substantial portion of the image remains blurred. However, a method called region completion is adopted to fill in the tainted part by using the information from the portion left unblemished by stains. A novel method to perform this operation is proposed in this paper. The three significant sta...

متن کامل

Appearance and Geometry Completion with Constrained Texture Synthesis

A novel approach for appearance and geometry completion over point-sampled geometry is presented in this paper. Based on the result of surface clustering and the given texture sample, we define a global texture energy function on the point set surface for direct texture synthesis. The color texture completion is performed by minimizing a constrained global energy using the existing texture on t...

متن کامل

Video Completion Using Global Optimization

Video completion is a computer vision technique to restore the holes in video sequences due to removal of the dynamic or static foreground object by filling the unknown region with the known information. In this paper, a novel algorithm for video completion of large holes in video sequences is proposed. Video completion is treated as a global optimization problem by enforcing the spatial-tempor...

متن کامل

Plausible 3D Colour Surface Completion Using Non-parametric Techniques

We consider the combined completion of 3D surface relief and colour for the hidden and missing portions of objects captured with 2 1 2 D (or 3D) capture techniques. Through an extension of nonparametric texture synthesis to facilitate the completion of localised 3D surface structure (relief) over an underlying geometric surface completion we achieve realistic, plausible completion and extension...

متن کامل

Automatic Image Completion with Structure Propagation and Texture Synthesis

In this paper, we present a novel automatic image completion solution in a greedy manner inspired by a primal sketch representation model. Firstly, an image is divided into structure (sketchable) components and texture (non-sketchable) components, and the missing structures, such as curves and corners, are predicted by tensor voting. Secondly, the textures along structural sketches are synthesi...

متن کامل

Solving Divergence in Knuth-Bendix Completion by Enriching Signatures

Thomas, M. and P. Watson, Solving divergence in Knuth-Bendix completion by enriching signatures. Theoretical Computer Science 112 (1993) 145-185. The Knuth-Bendix completion algorithm is a procedure which generates confluent and terminating sets of rewrite rules. The algorithm has many applications: the resulting rules can be used as a decision procedure for equality or, in the case of program ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1985